import request from '@/utils/request'
// 获取一级分类数据的接口
// GET /admin/product/getCategory1
export const reqCategory1List = () => request({
  url: `/admin/product/getCategory1`,
  method: 'GET'
})
// 二级分类接口
// GET /admin/product/getCategory1/ {category1id}
export const reqCategory2List = category1ID => request({
  url: `/admin/product/getCategory2/${category1ID}`,
  method: 'GET'
})
// 三级分类接口
// GET /admin/product/getCategory3/ {category3id}
export const reqCategory3List = category2ID => request({
  url: `/admin/product/getCategory3/${category2ID}`,
  method: 'GET'
})
// // 获取品台属性
// GET / admin / product / attrInfoList / {category1Id}{category2Id}/{ category3Id }
export const reqAttrList = (category1ID, category2ID, category3ID) => request({
  url: `/admin/product/attrInfoList/${category1ID}/${category2ID}/${category3ID}`,
  method: 'GET'
})
// 添加商品属性与属性值
// POST / admin / product / saveAttrInfo
export const reqAddorUpdataAttr = (data) => request({
  url: '/admin/product/saveAttrInfo',
  method: 'POST',
  data
})
